package small.woods.mskafka.service;

import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;
import small.woods.mskafka.stream.IMessageProvider;

/**
 * @description:
 * @author: yutingting
 * @create: 2022-01-13 10:25
 **/
@Component
@EnableBinding(value = {IMessageProvider.class})
public class KafkaReceiveService {
    @StreamListener(IMessageProvider.INPUT)
    public void receive(String message) {
        System.out.println("StreamReceiver: "+message);
    }

}
